package kaug.p2;

/**
 * Paint example.
 * See praktikumid.p09 and praktikumid.p10
 * packaged for commented code.
 * @author Ago
 *
 */
public class Main {

	public static void main(String[] args) {
		PaintFrame f = new PaintFrame();
		f.setVisible(true);
		//stringMethods();
	}
	
	public static void stringMethods() {
		// indices
		//                    11
		//          012345678901
		String s = "Hello world!";
		
		System.out.println(s.charAt(8));
		
		System.out.println(s.indexOf("world"));
		System.out.println(s.indexOf("Hello"));
		System.out.println(s.indexOf("maailm"));
		
		System.out.println(s.indexOf("o"));
		System.out.println(s.indexOf("o", 5));
		
		System.out.println(s.substring(6));
		// beginIndex - inclusive
		// endIndex - exclusive
		System.out.println(s.substring(6, 8));
		
		System.out.println(s.contains("world"));
	
		
	}
}
